package com.kclm.se.inter;

// @FunctionalInterface
public interface Movable {

	int EAST = 1;
    int WEST = 2;
    int SOUTH = 3;
    int NORTH = 4;
    //抽象方法
    void move(int direction, int speed);
    
    //默认方法
    default String convertDirection(int direction) {
        String desc = "";
        switch(direction) {
            case EAST:
                desc = "东方";
                break;
            case WEST:
                desc = "西方";
                break;
            case SOUTH:
                desc = "北方";
                break;
            case NORTH: 
                desc = "南方";
                break;
            default:
                desc = "unknown";
                break;
        }
        return desc;
    }
    
    static String staticConvert(int direction) {
        String desc = "";
        switch(direction) {
            case EAST:
                desc = "东方";
                break;
            case WEST:
                desc = "西方";
                break;
            case SOUTH:
                desc = "北方";
                break;
            case NORTH: 
                desc = "南方";
                break;
            default:
                desc = "unknown";
                break;
        }
        return desc;
    }
}
